POV-Ray : Newsgroups : povray.general : Povray script to OpenGL? : Re: Povray script to OpenGL? Server Time
4 Aug 2024 22:12:04 EDT (-0400)
  Re: Povray script to OpenGL?  
From: Warp
Date: 25 Mar 2003 12:46:33
Message: <3e8095f9@news.povray.org>
Tom Melly <tom### [at] tomandlucouk> wrote:
> Whilst internally POV can "see" that the shapes are infinite, at the trace-level
> POV must give up at some distance, otherwise (afaics) any scene with an infinite
> object might take forever to trace.

  Uh? Calculating the intersection point of a ray and a surface which
is very very far away does not take any longer than with a surface
which is close. Why would you think it does?

  Anyways, what you are looking for in your question is not tracing *time*,
but tracing *accuracy*. Since floating point numbers have limited accuracy,
there's a certain limit how far the intersection point can be. There's a
maximum value which can be represented with a floating point number (and
values near this maximum value are not very accurate, as they make rather
big "jumps").

  Theoretically the upper limit of a distance is really large, as the
maximum value which can be represented with a (64-bit) 'double' type
is about 1.8*10^308 (that's "18" followed by 307 zeros). So theoretically
you could have an intersection point that far away from the origin in each
axis.
  However, as I said, the representation of numbers near that value become
really inaccurate and thus it's not very feasible to get close to it.
  There's an artificial limit in POV-Ray how far an intersection can be in
order for it to have effect. This is done so that they don't get close to
this upper limit, where inaccuracies are large. (However, I seem to recall
that this artificial limit is almost paranoidically low, even though it
could be a lot higher.)

  Anyways, even when there are limits imposed by finite accuracy, the
amount of triangles needed to approximate such surface would be enormous
nevertheless.

-- 
plane{-x+y,-1pigment{bozo color_map{[0rgb x][1rgb x+y]}turbulence 1}}
sphere{0,2pigment{rgbt 1}interior{media{emission 1density{spherical
density_map{[0rgb 0][.5rgb<1,.5>][1rgb 1]}turbulence.9}}}scale
<1,1,3>hollow}text{ttf"timrom""Warp".1,0translate<-1,-.1,2>}//  - Warp -


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.